import { List } from 'antd-mobile'
import { useHistory } from 'react-router-dom'
const Item = List.Item
function ProList({ proList }) {
    const history = useHistory()
    return (
        <List>
            {
                proList && proList.map((item) => (
                    <Item
                        key={item.proid}
                        thumb={item.img1}
                        multipleLine
                        onClick={() => {
                            history.push('/detail/' + item.proid)
                        }}
                    >
                        {item.proname}
                    </Item>

                ))
            }
        </List>
    )
}

export default ProList